package com.bjSoft.regressionTestTool.codeCoverage.base;

import java.util.HashMap;

public class ClassCoverageInfo {
	private String className;
	private String packageName;
	
	private HashMap<String, MethodCoverage> methods;
	public ClassCoverageInfo(String className, String packageName) {
		super();
		this.className = className;
		this.methods = new HashMap<String, MethodCoverage>();
		this.packageName = packageName;
	}
	public ClassCoverageInfo() {
		super();
		this.methods = new HashMap<String, MethodCoverage>();
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public HashMap<String, MethodCoverage> getMethods() {
		return methods;
	}
	public MethodCoverage updateMethodCoverage(String methodName) {
		if(!this.methods.containsKey(methodName)) {
			MethodCoverage methodCov = new MethodCoverage(methodName);
			this.methods.put(methodName, methodCov);
			return methodCov;
		} else {
			return this.methods.get(methodName);
		}
	}
	public String getPackageName() {
		return this.packageName;
	}
	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}
}
